home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ShadingWinds.h
-
- Contains: This little application includes code to allow you to detect whether or not the Shell
- Window is "rolled up" by WindowShade. How do you do this? You check the window's
- contRgn. If the contRgn is empty, then the window is shaded. You'll note that the
- grafPort is unchanged by WindowShade, so if you need to save window dimensions, you
- can grab that information from the portRect.
-
- Written by: Virginia (Ginny) McCulloh
-
- Copyright: Copyright © 1995-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 8/9/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
-
-
- */
-
- /***** #includes *****/
- #include <QuickDraw.h>
- #include <Fonts.h>
- #include <Menus.h>
- #include <Events.h>
- #include <Gestalt.h>
- #include <Windows.h>
- #include <Dialogs.h>
- #include <Desk.h>
- #include <Resources.h>
- #include <SegLoad.h>
- #include <ToolUtils.h>
- #include <Types.h>
- #include <AppleEvents.h>
-
-
- /***** #defines *****/
- #define NIL 0L /* could also be written "0x00000000" */
- #define UNIMPLEMENTED 0xA89F /* A-trap code for unimplemented function */
- #define WAITNEXTEVENT 0xA860 /* A-trap code for WaitNextEvent() */
-
- /* kExtremeNeg and kExtremePos are used to set up wide open rectangles and regions. */
- #define kExtremeNeg -32700
- #define kExtremePos 32700
-
-
- #define WINDOWID 2000
- #define PUTINFRONT (WindowPtr) -1L
-
- #define ABOUTID 5000
-
- #define APPLEMENU 5001
- #define appleABOUT 1
- #define FILEMENU 5002
- #define fileQUIT 1
- #define EDITMENU 5003
- #define editUNDO 1
- /* ---------- */
- #define editCUT 3
- #define editCOPY 4
- #define editPASTE 5
- #define editCLEAR 6
- #define editSELECTALL 7
-
- #define TESTMENU 5004
- #define testWINDSHADE 1
- #define testHIDEWIND 2
- #define testREVEALWIND 3
-
-
- #define MAXMENUS 4
- #define FIRSTMENUID 5001
-
- #define TESTALERTID 6000
- #define BADSYSTEMID 6001
- #define BADQUICKDRAWID 6002
- #define NOAPPLEEVENTS 6003
-
-
- // Handy macros
- #define TopLeft(aRect) (* (Point *) &(aRect).top)
- #define BotRight(aRect) (* (Point *) &(aRect).bottom)
-
-